/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.library.api;

import java.io.Serializable;

/**
 *
 * @author Filip Ligac
 */
public class UserTO implements Serializable {

    private static final long serialVersionUID = 45L;
    private Long userID;
    private String email;
    private String firstName;
    private String lastName;
    private String password;

    public UserTO() {
    }

    public UserTO(String email, String password, String firstName, String lastName) {
        this.email = email;
        this.password = password;
        this.firstName = firstName;
        this.lastName = lastName;
    }
   
    public Long getUserID() {
        return userID;
    }

    public String getEmail() {
        return email;
    }

    public String getPassword() {
        return password;
    }
   
    public void setEmail(String email) {
        this.email = email;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }



    public void setUserID(Long userID) {
        this.userID = userID;
    }
   
    @Override
    public int hashCode() {
        int hash = 7;
        hash = 89 * hash + (this.userID != null ? this.userID.hashCode() : 0);
        hash = 89 * hash + (this.email != null ? this.email.hashCode() : 0);
        hash = 89 * hash + (this.password != null ? this.password.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof UserTO)) {
            return false;
        }
        UserTO other = (UserTO) object;
        if (this.email == null || !this.email.equals(other.email)) {
            return false;
        }
        if (this.password == null || !this.password.equals(other.password)) {
            return false;
        }     
        return true;
    }

    @Override
    public String toString() {
        return "User: "+ this.firstName + " " + this.lastName;
    }
}

